package com.sy.controller.admin;

import com.sy.dto.CourseUserPageQueryDTO;
import com.sy.dto.OrdersPageQueryDTO;
import com.sy.result.PageResult;
import com.sy.result.Result;
import com.sy.service.CourseUserService;
import com.sy.service.OrdersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("管理端-订单管理相关接口")
@Slf4j
@RestController
@RequestMapping("/admin/orders")
public class OrdersController {
    @Autowired
    private OrdersService ordersService;
    //课程查询
    @GetMapping("/findAll")
    @ApiOperation("订单分页查询")
    public Result<PageResult> findAll( OrdersPageQueryDTO ordersPageQueryDTO){
        log.info("报名课程分页查询",ordersPageQueryDTO);
        PageResult pageResult = ordersService.findAll(ordersPageQueryDTO);
        return Result.success(pageResult);
    }

    
}
